﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Mono.Data.Sqlite;
namespace DAL
{
    public class UserDao
    {
        public int Login(string username, string password)
        {
            string sql = "select count(0) from Admin where UserName = @username and Password = @password";
            SqliteParameter[] sp =
            {
                new SqliteParameter("username",username),
                new SqliteParameter("password", password)
            };

           return SQLiteHelper.ExecuteScalar(sql, sp);
        }
    }
}
